<script>
    function num(url) {
        $('#number').modal('show');
        $('#number').find('a').each(function () {
            $(this).attr('href', url + '?num=' + $(this).text());
        });
    }
</script>
<div id="number" class="modal fade">
    <div class="modal-dialog modal-sm">
        <div class="modal-content">
            <div class="modal-header">
                <h4 class="modal-title" id="mySmallModalLabel">请选择出题数</h4>
            </div>
            <div class="modal-body">
                <div class="btn-group" role="group" aria-label="First group">
                    <a class="btn btn-default">10</a>
                    <a class="btn btn-default">20</a>
                    <a class="btn btn-default">30</a>
                    <a class="btn btn-default">40</a>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">取消</button>
            </div>
        </div>
    </div>
</div>
<script>
    $('#number').find('a').each(function () {
        $(this).click(function () {
            $(this).html('<i class="fa fa-spinner fa-pulse"></i>').css('width', '41.58px');
        })
    });
</script>